package com.hpeu_01.day0119.homework;

import java.util.ArrayList;
import java.util.List;

public class HomeWork06 {
    public static void main(String[] args) {
        List<?> list = null;
        list = new ArrayList<String>();
        list = new ArrayList<Double>();
        list.add(null);

        List<String> l1 = new ArrayList<>();
        List<Integer> l2 = new ArrayList<>();
        l1.add("java");
        l2.add(8);
        method(l1);
        method(l2);
    }

    public static void method(List<?> list){
        for (Object o : list) {
            System.out.println(o);
        }
    }
}
